package com.wjp.eb.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wjp.eb.service.IndexService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("index")
public class IndexController {
    @Resource
    private IndexService indexService;
    @RequestMapping("/index")
    public String index(Model model){
        System.out.println("接收到一个服务器请求.............");

        Map<String, Page> resultMap = indexService.index(1,8);

        model.addAttribute("resultMap",resultMap);

        return  "index";
    }
}
